Working principle |

Contents of this page |

Introduction Working principle Wheel rotation in more detail The Steckerbrett Differences in Enigma models Recommended reading Thanks are due to...

Introduction |

This is an attempt to describe the working principle of the Enigma. When developing my Enigma Simulator for RISC OS, I've searched the Internet and read many articles and books. Most articles give a rough description of the machine, but many important details, necessary to deduct the algorithm, are missing. Below are my findings in a, hopefully, readable form. If you have any questions, remarks or additions, please do not hesitate to contact me.

Working principle |

When studying the working principle of the Enigma, we have to consider that there are in fact many different variants of this machine. Some of the differences make it impossible to decrypt a message that was encoded on another model. That does however not affect the working principle as explained here. For this we study the circuit diagram of an Enigma M3.
Letters are 'scrambled' by a set of rotatable wheels each with 26 contacts on either side. Each contact on one side is connected (wired) to a contact on the other side in some random fashion. Some models, like the M3 have 3 such rotating wheels, but the M4 model, used later in the war during the U-boat war, has 4 wheels. Each time a key is pressed, the right most wheel is rotated by one step, resulting in a different mapping of the internal wires. A wheel has one or more notches that may cause the next wheel to be moved by one position too. This will result in a different encoding for each letter entered on the keyboard! The keyboard consists of 26 keys, marked A-Z. Whenever a key, say Q, is pressed the wheels will be moved into a new position and a contact is closed. As a result a current will flow. The wires from the 26 keys are connected to a static wheel called the Stator or Entrittswalze (ETW). The order in which the keys are connected to the 26 contacts on the ETW varies between the different Enigma models. Leaving the ETW, the current enters the right most wheel (1) at the right hand side. The internal wiring of that wheel 'translates' this to one of the contacts of its left hand side, where it enters the next wheel, etc. Left of the rotating wheels is the Reflector, or Umkehrwalze (UKW). This wheel sends the current back into the rotating wheels, but this time the current flows from left to right, until it reaches the ETW again. From the ETW the current goes to the lamp board where the corresponding letter (W in the example) will be lit. It is inherent to this design, that a letter can never be encoded into itself. Before starting the ciphering process, the Enigma needs to be setup in a known way by both sides. This means the wheel order (Walzenlage) needs to be known as well as the starting position of each wheel (Grundstellung). In order to further complicate things, each wheel has a settable index ring that moves the contacts independant of the wheel's alphabet. This is called the ring setting (Ringstellung). To make life even more complex, some models are equipped with a plug panel (Steckerbrett) that allows letters to be swapped. Between none and 13 of such mappings may be added. If a key is not mapped (i.e. no stecker is used for that key), the letter is known to be Self-Steckered. See below for more information.

Wheel rotation in more detail |

When writing the Enigma Simulator, I had to find out exactly how the wheels are moved with each key press. First of all, the wheels are moved into a new position, before the key is encoded and the lamp is turned on. Each wheel has 26 positions that we will call A-Z. The index on the wheels is engraved (either as A-Z or 1-26) along the side of the wheel. The wheels are rotated clockwise, when viewed from the ETW. If A was visible in the window, the letter B will be visible next time the wheel is moved. Each wheel has a ring that can be used to rotate the wiring independantly of the index. This can be regarded as creating an offset in the opposite direction. The notches are fixed to the index. Therefore the turnover of the next wheel, will always happen at the same letter in the window. Furthermore most models are equipped with stepping levers and notches and will therefore exhibit a double stepping feature (see below). The Enigma G series however, uses a gear and does not suffer from the double stepping behaviour. |  |
Exploded view of a wheel (Photo by Jerry Proc)

The Steckerbrett |

The naval variants of the Enigma (M3 and M4) were equipped with a Steckerbrett (plug board or patch panel) that would allow any pair of letters to be swapped. If a patch cable was used beteen G and P, those two letters would be swapped. As we have 26 characters, a theoretical maximum of 13 cables could be used. Most machines however, were supplied with less (e.g. 10 or 11) cables. Note that any number of cables can be used, from none to 13, giving a much increased number of possible permutations. As the Steckerbrett is connected between the keyboard and the ETW, the encoded letter will go through stecker mappings twice. This would prevent a letter of being encoded into itself. The picture shows single patch cable. To prevent a plug from being inserted in the wrong way, a thick and a thin pin were used. Two wires were used to cross-connect the pins of both plugs. |  |
An original Enigma patch cable (Photo by Jim Oram)

Differences in Enigma models |

It has been stated before that there are many different versions of the Enigma. The various models may differ in:

Steckerbrett Some models have a plug panel and some don't. The theoretical maximum number of patch cables is 13 (as we have 26 letters), but the number of cables supplied with the unit varies. The maximum number of permutations is achieved with 11 patch cables. ETW mapping The Eintrittswalze (ETW) can be mapped in a linear fashion: ABCDEFGH... etc, but also in the order of the keys on the keyboard: QWERTZUIO... On the Japanese machine, the Tirpitz, the contacts of the ETW are organised in a random fashion: KZROUQHY... Number of different of wheels Some models have 3 rotatable wheels, but the M4 has 4 wheels. Also some models have a range of wheels (e.g. 8) to choose from. The wheels may be placed in the machine in any particular order. On an Enigma M4 (a 4 wheel machine), the extra wheel is not moved automatically, but can be set manually to an initial position. Furthermore the extra wheel cannot be exchanged with the other three wheels as it is a 'thin' one. The 4th wheel was supplied as a pair with an UKW. For UKWs B and C, the extra wheels Beta and Gamma where supplied, hence the name Griechenwalze (Greek wheel). They may be used however in any combination. The 4th wheel on an Abwehr Enigma (G-series) is moved by the other wheels, due to the mechanical difference of this model. UKW mapping and setting Some models have more than one UKW available. On most models the UKW is fixed, but on some the UKW can be given a start position. Additionally, the G models have a movable UKW, which means that the wheel can be moved by the notches of the wheel next to it. Number of notches on each wheel In the basic situation, each wheel has one notch which, after a full revolution, causes the next wheel to be stepped by one position. Some versions have two or even more notches on each wheel, causing more frequent changeovers of the next wheel. The three wheels of the Abwehr Enigma have 11, 15 and 17 notches respectively. Single or double stepping As a result of the mechanical principle of the stepping mechanism, the middle rotor 'suffers' from a double stepping anomaly as described in a paper by David Hamer (see below). The G models, which use a gear box instead, do not suffer from this anomaly. Manufacturer Before and during WWII, the Enigma machines were build by various manufacturers. Although these machines were mathematically compatible, there are a few cosmetic differences. Additionally there are physical differences between the thin wheels from some manufacturers.

Recommended reading |

Enigma: Actions Involved in the 'Double Stepping' of the Middle Rotor This document decribes the sequence of events which lead to the 'double stepping' behaviour of the middle rotor of a three rotor Enigma. Enigma variations: An Extended Family of Machines This document describes some less well known Enigma models, such as the Tirpitz and the Railway Enigma. It also briefly touches on the G-312. G-312: An Abwehr Enigma This document describes in great detail the working of the rare Enigma G with serial number 312. It is this machine that was stolen from the Bletchley Park exhibition and retrieved some time later.

Thanks are due to... |

David Hamer for providing advice, images and messages, Frode Weierud for providing advice, kind words and additional wiring information, Athur Bauer for providing detailed information about the M4 Enigma.

© Copyright Paul Reuvers. Last changed: Mon,08 Sep 2003.02:19:13